'''python框架内部脚本执行类变量，用于框架脚本执行和数据通信做数据缓存'''
class ScriptConfig(object):
    __SCRIPTS_VERSION = ''
    __RUN_FLAG = 'STOP'
    __RUN_CLASS_NAME = ''
    __RUN_METHOD_NAME = ''
    __UI_EXPECT = {}
    __INPUT_DATA = {}
    __OUTPUT_VAR = {}
    __EXTRA_PARAM = {}
    __RETURN_FLAG = ''
    __RETURN_VALUE = ''
    __PRODUCT_ID = ''
    __TASK_GROUP_ID = ''
    __TASK_ID = ''
    __CASE_ID = ''
    __CASE_NAME = ''
    __STEP_ID = ''
    __SCRIPT_ID = ''
    __SCRIPT_TIMEOUT = ''
    __TASK_TYPE = 'web'
    __STEP_TYPE = '0'
    __CASE_PROCESS_INFO = list()
    __TASK_MENU_RELATED = {'primary':{}, 'secondary':{}}
    __HTTP_SERVER_PORT = '21000'
    __PORT = '20000'
    __REMOTE_LOG_URL = ''
    __REMOTE_VAR_URL = ''
    ___BRANCH_NAME = ''

    @property
    def scripts_version(self):
        '''
        获取类变量__SCRIPTS_VERSION的值

        :Returns:
            返回类变量__SCRIPTS_VERSION的值
        '''
        return self.__SCRIPTS_VERSION

    @scripts_version.setter
    def scripts_version(self, scripts_version):
        '''
        设置类变量__SCRIPTS_VERSION的值

        :Args:
         - scripts_version: 类变量__SCRIPTS_VERSION的值
        '''
        self.__SCRIPTS_VERSION = scripts_version

    @property
    def run_flag(self):
        '''
        获取类变量run_flag的值

        :Returns:
            返回类变量run_flag的值
        '''
        return self.__RUN_FLAG

    @run_flag.setter
    def run_flag(self, run_flag):
        '''
        设置类变量run_flag的值

        :Args:
         - run_flag: 类变量run_flag的值
        '''
        self.__RUN_FLAG = run_flag

    @property
    def run_class_name(self):
        '''
        获取类变量__RUN_CLASS_NAME的值

        :Returns:
            返回类变量__RUN_CLASS_NAME的值
        '''
        return self.__RUN_CLASS_NAME

    @run_class_name.setter
    def run_class_name(self, run_class_name):
        '''
        设置类变量__RUN_CLASS_NAME的值

        :Args:
         - run_class_name: 类变量__RUN_CLASS_NAME的值
        '''
        self.__RUN_CLASS_NAME = run_class_name

    @property
    def run_method_name(self):
        '''
        获取类变量__RUN_METHOD_NAME的值

        :Returns:
            返回类变量__RUN_METHOD_NAME的值
        '''
        return self.__RUN_METHOD_NAME

    @run_method_name.setter
    def run_method_name(self, run_method_name):
        '''
        设置类变量__RUN_METHOD_NAME的值

        :Args:
         - run_method_name: 类变量__RUN_METHOD_NAME的值
        '''
        self.__RUN_METHOD_NAME = run_method_name

    @property
    def ui_expect(self):
        '''
        获取类变量__UI_EXPECT的值

        :Returns:
            返回类变量__UI_EXPECT的值
        '''
        return self.__UI_EXPECT

    @ui_expect.setter
    def ui_expect(self, ui_expect):
        '''
        设置类变量__UI_EXPECT的值

        :Args:
         - ui_expect: 类变量__UI_EXPECT的值
        '''
        self.__UI_EXPECT = ui_expect

    @property
    def input_data(self):
        '''
        获取类变量__INPUT_DATA的值

        :Returns:
            返回类变量__INPUT_DATA的值
        '''
        return self.__INPUT_DATA

    @input_data.setter
    def input_data(self, input_data):
        '''
        设置类变量__INPUT_DATA的值

        :Args:
         - input_data: 类变量__INPUT_DATA的值
        '''
        self.__INPUT_DATA = input_data

    @property
    def output_var(self):
        '''
        获取类变量__OUTPUT_VAR的值

        :Returns:
            返回类变量__OUTPUT_VAR的值
        '''
        return self.__OUTPUT_VAR

    @output_var.setter
    def output_var(self, output_var):
        '''
        设置类变量__OUTPUT_VAR的值

        :Args:
         - output_var: 类变量__OUTPUT_VAR的值
        '''
        self.__OUTPUT_VAR = output_var

    @property
    def extra_param(self):
        '''
        获取类变量__EXTRA_PARAM的值

        :Returns:
            返回类变量__EXTRA_PARAM的值
        '''
        return self.__EXTRA_PARAM

    @extra_param.setter
    def extra_param(self, extra_param):
        '''
        设置类变量__EXTRA_PARAM的值

        :Args:
         - extra_param: 类变量__EXTRA_PARAM的值
        '''
        self.__EXTRA_PARAM = extra_param

    @property
    def return_flag(self):
        '''
        获取类变量__RETURN_FLAG的值

        :Returns:
            返回类变量__RETURN_FLAG的值
        '''
        return self.__RETURN_FLAG

    @return_flag.setter
    def return_flag(self, return_flag):
        '''
        设置类变量__RETURN_FLAG的值

        :Args:
         - return_flag: 类变量__RETURN_FLAG的值
        '''
        self.__RETURN_FLAG = return_flag

    @property
    def return_value(self):
        '''
        获取类变量__RETURN_VALUE的值

        :Returns:
            返回类变量__RETURN_VALUE的值
        '''
        return self.__RETURN_VALUE

    @return_value.setter
    def return_value(self, return_value):
        '''
        设置类变量__RETURN_VALUE的值

        :Args:
         - return_value: 类变量__RETURN_VALUE的值
        '''
        self.__RETURN_VALUE = return_value

    @property
    def product_id(self):
        '''
        获取类变量__PRODUCT_ID的值

        :Returns:
            返回类变量__PRODUCT_ID的值
        '''
        return self.__PRODUCT_ID

    @product_id.setter
    def product_id(self, product_id):
        '''
        设置类变量__PRODUCT_ID的值

        :Args:
         - product_id: 类变量__PRODUCT_ID的值
        '''
        self.__PRODUCT_ID = product_id

    @property
    def task_group_id(self):
        '''
        获取类变量__TASK_GROUP_ID的值

        :Returns:
            返回类变量__TASK_GROUP_ID的值
        '''
        return self.__TASK_GROUP_ID

    @task_group_id.setter
    def task_group_id(self, task_group_id):
        '''
        设置类变量__TASK_GROUP_ID的值

        :Args:
         - task_group_id: 类变量__TASK_GROUP_ID的值
        '''
        self.__TASK_GROUP_ID = task_group_id

    @property
    def task_id(self):
        '''
        获取类变量__TASK_ID的值

        :Returns:
            返回类变量__TASK_ID的值
        '''
        return self.__TASK_ID

    @task_id.setter
    def task_id(self, task_id):
        '''
        设置类变量__TASK_ID的值

        :Args:
         - task_id: 类变量__TASK_ID的值
        '''
        self.__TASK_ID = task_id

    @property
    def case_id(self):
        '''
        获取类变量__CASE_ID的值

        :Returns:
            返回类变量__CASE_ID的值
        '''
        return self.__CASE_ID

    @case_id.setter
    def case_id(self, case_id):
        '''
        设置类变量__CASE_ID的值

        :Args:
         - case_id: 类变量__CASE_ID的值
        '''
        self.__CASE_ID = case_id

    @property
    def case_name(self):
        '''
        获取类变量__CASE_NAME的值

        :Returns:
            返回类变量__CASE_NAME的值
        '''
        return self.__CASE_NAME

    @case_name.setter
    def case_name(self, case_name):
        '''
        设置类变量__CASE_NAME的值

        :Args:
         - case_name: 类变量__CASE_NAME的值
        '''
        self.__CASE_NAME = case_name

    @property
    def step_id(self):
        '''
        获取类变量__STEP_ID的值

        :Returns:
            返回类变量__STEP_ID的值
        '''
        return self.__STEP_ID

    @step_id.setter
    def step_id(self, step_id):
        '''
        设置类变量__STEP_ID的值

        :Args:
         - step_id: 类变量__STEP_ID的值
        '''
        self.__STEP_ID = step_id

    @property
    def script_id(self):
        '''
        获取类变量__SCRIPT_ID的值

        :Returns:
            返回类变量__SCRIPT_ID的值
        '''
        return self.__SCRIPT_ID

    @script_id.setter
    def script_id(self, script_id):
        '''
        设置类变量__SCRIPT_ID的值

        :Args:
         - script_id: 类变量__SCRIPT_ID的值
        '''
        self.__SCRIPT_ID = script_id

    @property
    def task_type(self):
        '''
        获取类变量__TASK_TYPE的值

        :Returns:
            返回类变量__TASK_TYPE的值
        '''
        return self.__TASK_TYPE

    @task_type.setter
    def task_type(self, task_type):
        '''
        设置类变量__TASK_TYPE的值

        :Args:
         - task_type: 类变量__TASK_TYPE的值
        '''
        self.__TASK_TYPE = task_type

    @property
    def step_type(self):
        '''
        获取类变量__STEP_TYPE的值

        :Returns:
            返回类变量__STEP_TYPE的值
        '''
        return self.__STEP_TYPE

    @step_type.setter
    def step_type(self, step_type):
        '''
        设置类变量__STEP_TYPE的值

        :Args:
         - step_type: 类变量__STEP_TYPE的值
        '''
        self.__STEP_TYPE = step_type

    @property
    def http_server_port(self):
        '''
        获取类变量__HTTP_SERVER_PORT的值

        :Returns:
            返回类变量__HTTP_SERVER_PORT的值
        '''
        return self.__HTTP_SERVER_PORT

    @http_server_port.setter
    def http_server_port(self, http_server_port):
        '''
        设置类变量__HTTP_SERVER_PORT的值

        :Args:
         - http_server_port: 类变量__HTTP_SERVER_PORT的值
        '''
        self.__HTTP_SERVER_PORT = http_server_port

    @property
    def port(self):
        '''
        获取类变量__HTTP_SERVER_PORT的值

        :Returns:
            返回类变量__HTTP_SERVER_PORT的值
        '''
        return self.__PORT

    @port.setter
    def port(self, port):
        '''
        设置类变量__HTTP_SERVER_PORT的值

        :Args:
         - http_server_port: 类变量__HTTP_SERVER_PORT的值
        '''
        self.__PORT = port

    @property
    def remote_log_url(self):
        '''
        获取类变量__REMOTE_LOG_URL的值

        :Returns:
            返回类变量__REMOTE_LOG_URL的值
        '''
        self.__REMOTE_LOG_URL = 'http://127.0.0.1:{}/PythonLog/'.format(self.__HTTP_SERVER_PORT)
        return self.__REMOTE_LOG_URL

    @remote_log_url.setter
    def remote_log_url(self, remote_log_url):
        '''
        设置类变量__REMOTE_LOG_URL的值

        :Args:
         - remote_log_url: 类变量__REMOTE_LOG_URL的值
        '''
        self.__REMOTE_LOG_URL = remote_log_url

    @property
    def remote_var_url(self):
        '''
        获取类变量__REMOTE_VAR_URL的值

        :Returns:
            返回类变量__REMOTE_VAR_URL的值
        '''
        self.__REMOTE_VAR_URL = 'http://127.0.0.1:{}/BladeVariable/'.format(self.__HTTP_SERVER_PORT)
        return self.__REMOTE_VAR_URL

    @remote_var_url.setter
    def remote_var_url(self, remote_var_url):
        '''
        设置类变量__REMOTE_VAR_URL的值

        :Args:
         - remote_var_url: 类变量__REMOTE_VAR_URL的值
        '''
        self.__REMOTE_VAR_URL = remote_var_url

    @property
    def case_process_info(self):
        '''
        获取类变量__CASE_PROCESS_INFO的值

        :Returns:
            返回类变量__CASE_PROCESS_INFO的值
        '''
        return self.__CASE_PROCESS_INFO

    @case_process_info.setter
    def case_process_info(self, case_process_info):
        '''
        设置类变量__CASE_PROCESS_INFO的值

        :Args:
         - case_process_info: 类变量__CASE_PROCESS_INFO的值
        '''
        self.__CASE_PROCESS_INFO = case_process_info

    @property
    def task_menu_related(self):
        '''
        获取类变量__TASK_MENU_RELATED的值

        :Returns:
            返回类变量__TASK_MENU_RELATED的值
        '''
        return self.__TASK_MENU_RELATED

    @task_menu_related.setter
    def task_menu_related(self, task_menu_related):
        '''
        设置类变量__TASK_MENU_RELATED的值

        :Args:
         - task_menu_related: 类变量__TASK_MENU_RELATED的值
        '''
        self.__TASK_MENU_RELATED = task_menu_related

    @property
    def script_timeout(self):
        '''
        获取类变量__SCRIPT_ID的值

        :Returns:
            返回类变量__SCRIPT_ID的值
        '''
        return self.__SCRIPT_TIMEOUT

    @script_timeout.setter
    def script_timeout(self, script_timeout):
        '''
        设置类变量__SCRIPT_ID的值

        :Args:
         - script_id: 类变量__SCRIPT_ID的值
        '''
        self.__SCRIPT_TIMEOUT = script_timeout

    @property
    def branch_name(self):
        '''
        获取类变量__BRANCH_NAME的值

        :Returns:
            返回类变量__BRANCH_NAME的值
        '''
        return self.___BRANCH_NAME

    @branch_name.setter
    def branch_name(self, branch_name):
        '''
        设置类变量__BRANCH_NAM的值

        :Args:
         - branch_name: 类变量__BRANCH_NAM的值
        '''
        self.___BRANCH_NAME = branch_name


script_config = ScriptConfig()
